docs: Update an example
authorMatthias Clasen <mclasen@redhat.com>
Mon, 10 Feb 2020 03:41:58 +0000 (22:41 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 10 Feb 2020 04:12:32 +0000 (23:12 -0500)
Don't use gtk_main() in the mainloop example.
It is going away.

gtk/gtkmain.c

index 06fdd28cf7ef7d92cf55a87c9bc78b3c83297a42..2869db48466bde11291b03dc9889dd43b26b877f 100644 (file)
  *   gtk_widget_show (mainwin);
  *
  *   // Enter the main event loop, and wait for user interaction
- *   gtk_main ();
+ *   while (!done)
+ *     g_main_context_iteration (NULL, TRUE);
  *
  *   // The user lost interest
  *   return 0;
  * }
  * ]|
  *
- * It’s OK to use the GLib main loop directly instead of gtk_main(), though it
- * involves slightly more typing. See #GMainLoop in the GLib documentation.
+ * See #GMainLoop in the GLib documentation to learn more about
+ * main loops and their features.
  */
 
 #include "config.h"